import numpy

import hamiltonian_N_sz

class Measurements:
    pass

class Hamiltonian:
    def __init__(self, **kwargs):
        u = kwargs['u']
        mu = kwargs['mu'];
        kMatrix = kwargs['kMatrix']
        self.nSites = kMatrix.nSites
        nElectrons = kwargs['nElectrons']
        szList = range(-nElectrons, nElectrons +1)

        for sz in szList:
            stateList = States(nElectrons = nElectrons, sz = sz, nSites = self.nSites)
            for states in stateList:
                h = hamiltonian_N_sz.Hamiltonian_N_sz(kMatrix = kMatrix, u = u, nElectrons = nElectrons, sz = sz, states = states)
                hBlock = h.h

                eigenvalues = numpy.linalg.eigvalsh(hBlock)
                self.measurements = Measurements()
                self.measurements.eigenvalues = eigenvalues